Semiconductor devices have various structures. For example, there are transistors that are used in LSIs (Large Scale Integrated circuits) integrated two-dimensionally, semiconductor memory, etc. For even higher integration of such semiconductor devices, semiconductor devices having three-dimensional structures are being considered. Also, there are cases where a vertical transistor is used as a selection element in semiconductor devices that has three-dimensional structures.